package com.sxt.controller;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class indexController {
	 // logback
    private final static Logger logger = LoggerFactory.getLogger(indexController.class);
	 /**
	  *  访问首页 127.0.0.1:8080/index
     * @return
     */
    @RequestMapping("/index")
    public String index(){
        logger.debug("记录debug日志");
        logger.info("访问了index方法");
        logger.error("记录了error错误日志");
        return "index";
    }
}
